package org.btik.light.meta;


import org.springframework.util.ObjectUtils;

import java.util.Objects;

/**
 * dev数据状态对象
 */
public class DefaultDevMo extends DevMo {
    private String displayName;

    public String getDisplayName() {
        if (ObjectUtils.isEmpty(displayName)) {
            return devType;
        }
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public boolean hasDisplayName() {
        return !ObjectUtils.isEmpty(displayName);
    }

    public DefaultDevMo(String sn, DevState devState) {
        super(sn, devState);
    }

    public DefaultDevMo() {
    }
}
